#define _CRT_SECURE_NO_WARNINGS 1
#include <vector>
using namespace std;
class Solution {
public:
    int uniquePaths(int m, int n)
    {
        vector<vector<int>> dp(m + 1, vector<int>(n + 1, 0));
        dp[1][1] = 1;
        for (int i = 0;i < m;++i)
        {
            for (int j = 0;j < n;++j)
            {
                dp[i + 1][j + 1] += (dp[i][j + 1] + dp[i + 1][j]);
            }
        }
        return dp[m][n];
    }
};